import request from "@/utils/request";

// 添加客户
export function addCustomer(data) {
  return request({
    url: "/backAdmin/merchantCustomerApi/add",
    method: "post",
    data: data,
  });
}

// 删除客户
export function deleteCustomer(merchantCustomerIdList) {
  return request({
    url: `/backAdmin/merchantCustomerApi/delete?merchantCustomerIdList=${merchantCustomerIdList}`,
    method: "post",
  });
}

// 获取客户列表
export function getCustomerList(query) {
  return request({
    url: "/backAdmin/merchantCustomerApi/list",
    method: "get",
    params: query,
  });
}

// 修改客户
export function updateCustomer(data) {
  return request({
    url: "/backAdmin/merchantCustomerApi/update",
    method: "post",
    data: data,
  });
}
